package cn.iocoder.yudao.module.research.controller.admin.alert.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 告警 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AlertRespVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "14729")
    @ExcelProperty("ID")
    private Long id;

    @Schema(description = "XFF")
    @ExcelProperty("XFF")
    private String xff;

    @Schema(description = "url", example = "https://www.iocoder.cn")
    @ExcelProperty("url")
    private String url;

    @Schema(description = "告警时间")
    @ExcelProperty("告警时间")
    private LocalDateTime alertTime;

    @Schema(description = "威胁名称", example = "李四")
    @ExcelProperty("威胁名称")
    private String threatName;

    @Schema(description = "威胁等级")
    @ExcelProperty(value = "威胁等级", converter = DictConvert.class)
    @DictFormat("research_threat_level") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String threatLevel;

    @Schema(description = "方向")
    @ExcelProperty("方向")
    private String direction;

    @Schema(description = "源IP")
    @ExcelProperty("源IP")
    private String sourceIp;

    @Schema(description = "源IPlong")
    @ExcelProperty("源IPlong")
    private Long sourceIpLong;

    @Schema(description = "目的IP")
    @ExcelProperty("目的IP")
    private String destIp;

    @Schema(description = "目的IPlong")
    @ExcelProperty("目的IPlong")
    private Long destIpLong;

    @Schema(description = "状态码")
    @ExcelProperty("状态码")
    private String statusCode;

    @Schema(description = "状态（0正常 1停用）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("状态（0正常 1停用）")
    private Integer status;

    @Schema(description = "备注", example = "随便")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "syslog ID", example = "27140")
    @ExcelProperty("syslog ID")
    private Long syslogId;

    @Schema(description = "威胁类型", example = "1")
    @ExcelProperty("威胁类型")
    private String attackType;

    @Schema(description = "源端口")
    @ExcelProperty("源端口")
    private Integer sourcePort;

    @Schema(description = "目的端口")
    @ExcelProperty("目的端口")
    private Integer destPort;

    @Schema(description = "分析步骤")
    @ExcelProperty("分析步骤")
    private String analyzeStep;

    @Schema(description = "是否是攻击（0否 1是）", example = "2")
    @ExcelProperty(value = "是否是攻击（0否 1是）", converter = DictConvert.class)
    @DictFormat("infra_boolean_string") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer attackStatus;

}